package com.platform.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;

/**
 * describe:模块资源表
 *
 * @author rainly
 * @date 2019/12/06
 * @time 2:47 下午
 */
@ApiModel(value = "模块资源表", description = "模块资源表 sys_operation")
@Data
@TableName(value = "sys_resource")
public class SysResource extends BaseEntity<SysResource> {

    @ApiModelProperty(value = "resource_id", name = "主键", example = "32位uuid", required = true)
    @Id
    @Column(name = "resource_id", length = 32, columnDefinition = "varchar(32) COMMENT '主键'")
    @TableId(type = IdType.ASSIGN_ID)
    private String resourceId;

    @ApiModelProperty(value = "模块资源名称", name = "resource_name", example = "模块资源名称", required = true)
    @Column(name = "resource_name", length = 50, columnDefinition = "varchar(50) COMMENT '模块资源名称'")
    private String resourceName;

    @ApiModelProperty(value = "模块资源编码", name = "resource_code", example = "模块资源编码", required = true)
    @Column(name = "resource_code", length = 50, columnDefinition = "varchar(50) COMMENT '模块资源编码'")
    private String resourceCode;

    @ApiModelProperty(value = "标记", name = "flag", example = "标记(disable 删除 unable 正常)", required = true)
    @Column(name = "flag", length = 20, columnDefinition = "varchar(20) COMMENT '标记(disable 删除 unable 正常)'")
    @TableField(fill = FieldFill.INSERT)
    private String flag;
}
